/* 判断是否是数组 */
export function isArray(str) {
  return Object.prototype.toString.call(str) === '[object Array]'
}
/* 转化url参数为对象 */
export function GetRequest () {
  const url = location.search // 获取url中"?"符后的字串
  const theRequest = {}
  if (url.indexOf('?') !== -1) {
    const str = url.substr(1)
    const strs = str.split('&')
    for (let i = 0; i < strs.length; i++) {
      theRequest[strs[i].split('=')[0]] = unescape(strs[i].split('=')[1])
    }
  }
  return theRequest
}
